package context.render.tiu;

import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL20;

public class GroupTIU
{
    
    private TIU[] mLTIUs;
    
    
    /** NOTE: REQUIRES OPENGL CONTEXT TO INSTANTIATE! */
    public GroupTIU()
    {
        int numTIUs = GL11.glGetInteger(GL20.GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS);
        // System.out.println("Supported number of TIUs: " + numTIUs);
        // Init the list of TIU objects with the largest length possible.
        this.mLTIUs = new TIU[numTIUs];
        for (int i = 0; i < this.mLTIUs.length; i++)
        {
            this.mLTIUs[i] = new TIU(i);
        }
    }
    
    
    public TIU get(int aIndex)
    {
        return this.mLTIUs[aIndex];
    }
    
}
